<template>
	<view class="list">
		<view class="list__content">
			<navigator :url="'/pages/tabbar/study/details/index?id=' + item.id + '&type=1'" class="list__contentin" hover-class="none"
			 v-for="(item, index) in list" :key="index">
				<view class="list__contentin-text">
					<view class="text-sign">
					<span class="text-span">{{ item.tag }}</span></view>
					<view class="text__title">{{ item.title }}</view>
				</view>
				<view class="list__contentin-timeBox">
					<view class="list__contentin-timeBox-time">{{ item.publishTime }}</view>
					<view class="list__contentin-timeBox-read">{{item.readVolume}} 已阅</view>
				</view>
			</navigator>
		</view>
	</view>

</template>

<script>
	export default {
		name: "textContent",
		props: {
			list: {
				type: Array,
				default: function() {
					return [];
				}
			}
		}
	}
</script>

<style lang="less">
	@keyframes geiwogun {
		from {
			transform: translate(0, 0);
		}

		to {
			transform: translate(-50%, 0);
		}
	}

	// 列表
	.list {

		&__content {
			/*margin: 20upx 30upx 0;*/
			padding: 25upx 0 0 0;
			border-radius: 10upx;
			width: 93%;
			box-shadow: 0 0 10px #eaeaea;
			margin: 10px auto;
			background-color: #FFFFFF;

			.list__contentin {
				padding: 20upx 0 40upx;
				margin: 0 20upx;
				border-bottom: 1upx dashed #dddddd;

				&-text {
					display: flex;
					align-items: center;


					.text__title {
						flex: 1;
						font-size: 28upx;
						overflow: hidden;
						text-overflow: ellipsis;
						display: -webkit-box;
						-webkit-box-orient: vertical;
						-webkit-line-clamp: 1;

					}

					.text-sign {
						position: relative;
						overflow: hidden;
						padding: 0 10upx;
						width: 150upx;
						height: 32upx;
						background-color: #4a96f2;
						border-radius: 16upx;
						margin-right: 20upx;
						font-size: 20upx;
						line-height: 32upx;
						text-align: center;
						color: #fff;
					}
					.text-span{
						position: absolute;
						animation: geiwogun 12s linear infinite;
						white-space: nowrap;

					}
				}

				&-timeBox {
					display: flex;

					&-time {
						font-size: 20upx;
						margin-top: 20upx;
						color: #999999;
						flex: 1;
					}

					&-read {
						font-size: 20upx;
						margin-top: 20upx;
						color: #999999;
						text-align: right;
						flex: 0.5;
					}
				}
			}

			.list__contentin:last-child {
				border-bottom: 0;
			}

			.list__contentin:first-child {
				padding-top: 0;
			}
		}
	}
</style>
